﻿using System.Windows.Input;
using System.Windows.Interop;
using Byond.Logging;

namespace Byond.Vst
{
	internal class HwndSourceEx : HwndSource
	{
		private readonly IUserLogger _logger;

		public HwndSourceEx(HwndSourceParameters hwndParams, IUserLogger logger)
			: base(hwndParams)
		{
			_logger = logger;
		}

		protected override bool TranslateAcceleratorCore(ref MSG msg, ModifierKeys modifiers)
		{
			_logger.Log("TranslateAccel");
			return base.TranslateAcceleratorCore(ref msg, modifiers);
		}

		protected override bool TranslateCharCore(ref MSG msg, ModifierKeys modifiers)
		{
			_logger.Log("Char");
			return base.TranslateCharCore(ref msg, modifiers);
		}

		protected override bool OnMnemonicCore(ref MSG msg, ModifierKeys modifiers)
		{
			_logger.Log("OnMnemonic");
			return base.OnMnemonicCore(ref msg, modifiers);
		}
	}
}